package com.tairanchina.md.meeting.resource;

import com.tairanchina.md.elife.rabbit.constants.ConnConstants;
import com.tairanchina.md.mallorder.constants.RabbitConstants;
import com.tairanchina.md.mallorder.order.dto.YearPartyTipDto;
import com.tairanchina.md.meeting.constants.MeetingConstants;
import com.tairanchina.md.meeting.constants.RabbitConnConstants;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import java.util.Date;

/**
 * Created by lxliuxuan on 2017/1/13.
 */
@Path("/test")
public class TestResource {

    @GET
    public String test(){
        try {
           YearPartyTipDto tipDto = new YearPartyTipDto();
             tipDto.setUserPhone("17010051824");
            tipDto.setTipMoney(0.01);
            tipDto.setTipTime(new Date().getTime());
            tipDto.setProgramId("BC5F7382C5EB414FBE3E6FB412582BAB");
            ConnConstants.getProducerClient().sendMessage(MeetingConstants.EXCHANGE_NAME_YEAR_REWARD,MeetingConstants.QUEUE_KEY_YEAR_REWARD,tipDto);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  "success";
    }
}
